import {defHttp} from '/@/utils/http/axios';
import {PageParams} from "/@/api/model/baseModel";


enum Api {
  page = '/userGoods/page',
  get = '/userGoods/get',
  update = '/userGoods/update',
  remove = '/userGoods/remove'
}

export const userGoodsPage = (pageParams: PageParams) =>
  defHttp.get({url: Api.page, params: {pageParams}}, {errorMessageMode: 'none'});

export const get = (id: string) =>
  defHttp.get({url: Api.get, params: {id: id}}, {errorMessageMode: 'none'});

export const update = (params) =>
  defHttp.post({url: Api.update, params: params}, {errorMessageMode: 'none'});

export const remove = (ids:string) =>
  defHttp.post({url: Api.remove, params: {ids:ids}}, {errorMessageMode: 'none'});
